package com.zhou.app.favourite.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.zhou.common.lib.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户信息表
 * </p>
 *
 * @author zxf
 * @since 2023-05-13
 */
@Getter
@Setter
@TableName("sys_user")
@ApiModel(value = "SysUser对象", description = "用户信息表")
public class SysUser extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户ID", position = 1)
    @JsonProperty(index = 1)
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    @ApiModelProperty(value = "用户账号", position = 2)
    @JsonProperty(index = 2)
    private String userName;

    @ApiModelProperty(value = "密码", position = 3)
    @JsonProperty(index = 3)
    private String password;

    @ApiModelProperty(value = "用户昵称", position = 4)
    @JsonProperty(index = 4)
    private String nickName;

    @ApiModelProperty(value = "用户邮箱", position = 5)
    @JsonProperty(index = 5)
    private String email;

    @ApiModelProperty(value = "手机号码", position = 6)
    @JsonProperty(index = 6)
    private String phonenumber;

    @ApiModelProperty(value = "用户性别（0男 1女 2未知）", position = 7)
    @JsonProperty(index = 7)
    private Integer sex;

    @ApiModelProperty(value = "头像地址", position = 8)
    @JsonProperty(index = 8)
    private String avatar;

    @ApiModelProperty(value = "用户类型（00系统用户）", position = 9)
    @JsonProperty(index = 9)
    private Integer userType;

    @ApiModelProperty(value = "帐号状态（0正常 1停用）", position = 10)
    @JsonProperty(index = 10)
    private Boolean status;

    @ApiModelProperty(value = "最后登录IP", position = 11)
    @JsonProperty(index = 11)
    private String loginIp;

    @ApiModelProperty(value = "最后登录时间", position = 12)
    @JsonProperty(index = 12)
    private LocalDateTime loginDate;

    @ApiModelProperty(value = "备注", position = 13)
    @JsonProperty(index = 13)
    private String remark;
}
